/* 格式化配置 */
export function randomString(e) {  
    e = e || 32;
    let t = "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678",
    a = t.length,
    n = "";
    for (let i = 0; i < e; i++) n += t.charAt(Math.floor(Math.random() * a));
    return n
}

/* is IE 9 */
export function IsIE_nine() {
    if (!!window.ActiveXObject || 'ActiveXObject' in window) {  // 判断IE
        const userAgent = navigator.userAgent //取得浏览器的userAgent字符串
        const isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1
        const reIE = new RegExp('MSIE (\\d+\\.\\d+);')
        reIE.test(userAgent)
        const fIEVersion = parseFloat(RegExp['$1'])
        if (fIEVersion === 10) {
            return 10
        } else if (isIE11) {
            return 11
        } else {
            return 9
        }
    }
}

